package ddemo.service;

import ddemo.dao.ChargerMapper;
import ddemo.dao.UserMapper;
import ddemo.factory.MapperProxyFactory;
import ddemo.pojo.Charger;
import ddemo.pojo.Interface;

import java.util.List;

public class ChargerService {
    private static ChargerMapper chargerMapper = MapperProxyFactory.getMapper(ChargerMapper.class);

    public static List<Charger> searchChargers(){
        return chargerMapper.searchCharger();
    }
    public static int addCharger(Integer chargerNumber,String position){
        return chargerMapper.addCharger(chargerNumber,position);
    }
    public static void updateCharger(int chargerNumber, String position,Integer id) {
        chargerMapper.updateCharger(chargerNumber,position,id);
    }

    public static List<Charger> getCharger() {
        return chargerMapper.getcharger();
    }
}
